package com.haiqi.modules.map.web;

import com.github.pagehelper.PageInfo;
import com.haiqi.common.BaseController;
import com.haiqi.common.bean.PageBean;
import com.haiqi.common.persistence.entity.Server;
import com.haiqi.modules.map.service.ServerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * Created by Administrator on 2017/8/16 0016.
 */
@RequestMapping("/api/server")
@Controller
//@SafeAuthority(menuCode = "monitorLocation,companyMonitorLocation")
public class ServerController extends BaseController {


    @Autowired
    private  ServerService serverService;

    @RequestMapping("/gasoline")
    @ResponseBody
    public PageInfo<Server> gasoline(HttpSession session, Server server, PageBean page){
        server.setServerType("加油");
        PageInfo<Server> pageInfo = serverService.getDataList(server,page);
        return pageInfo;
    }



    @RequestMapping("/water")
    @ResponseBody
    public PageInfo<Server> water(HttpSession session, Server server, PageBean page){
        server.setServerType("加水");
        PageInfo<Server> pageInfo = serverService.getDataList(server,page);
        return pageInfo;
    }
}
